package com.example.log;

import cn.hutool.core.io.FileUtil;


public final class Logs {
    private static Logs instance = null;


    private Logs() {
    }

    public static Logs getInstance() {
        if (instance == null) { // 延迟加载
            synchronized (Logs.class) { // 同步锁
                if (instance == null)
                    instance = new Logs();
            }
        }
        return instance;
    }

    public   void log(String logs){
        FileUtil.appendUtf8String(logs +"\r\n","log.txt");
    }
}
